package com.brainhealth.customer.service.impl;

import java.util.List;
import com.brainhealth.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.brainhealth.customer.mapper.ScoreMallOrderDetailMapper;
import com.brainhealth.customer.domain.ScoreMallOrderDetail;
import com.brainhealth.customer.service.IScoreMallOrderDetailService;

/**
 * 积分商城订单明细表Service业务层处理
 * 
 * @author wolong
 * @date 2023-11-01
 */
@Service
public class ScoreMallOrderDetailServiceImpl implements IScoreMallOrderDetailService 
{
    @Autowired
    private ScoreMallOrderDetailMapper scoreMallOrderDetailMapper;

    /**
     * 查询积分商城订单明细表
     * 
     * @param id 积分商城订单明细表主键
     * @return 积分商城订单明细表
     */
    @Override
    public ScoreMallOrderDetail selectScoreMallOrderDetailById(Long id)
    {
        return scoreMallOrderDetailMapper.selectScoreMallOrderDetailById(id);
    }

    /**
     * 查询积分商城订单明细表列表
     * 
     * @param scoreMallOrderDetail 积分商城订单明细表
     * @return 积分商城订单明细表
     */
    @Override
    public List<ScoreMallOrderDetail> selectScoreMallOrderDetailList(ScoreMallOrderDetail scoreMallOrderDetail)
    {
        return scoreMallOrderDetailMapper.selectScoreMallOrderDetailList(scoreMallOrderDetail);
    }

    /**
     * 新增积分商城订单明细表
     * 
     * @param scoreMallOrderDetail 积分商城订单明细表
     * @return 结果
     */
    @Override
    public int insertScoreMallOrderDetail(ScoreMallOrderDetail scoreMallOrderDetail)
    {
        scoreMallOrderDetail.setCreateTime(DateUtils.getNowDate());
        return scoreMallOrderDetailMapper.insertScoreMallOrderDetail(scoreMallOrderDetail);
    }

    /**
     * 修改积分商城订单明细表
     * 
     * @param scoreMallOrderDetail 积分商城订单明细表
     * @return 结果
     */
    @Override
    public int updateScoreMallOrderDetail(ScoreMallOrderDetail scoreMallOrderDetail)
    {
        scoreMallOrderDetail.setUpdateTime(DateUtils.getNowDate());
        return scoreMallOrderDetailMapper.updateScoreMallOrderDetail(scoreMallOrderDetail);
    }

    /**
     * 批量删除积分商城订单明细表
     * 
     * @param ids 需要删除的积分商城订单明细表主键
     * @return 结果
     */
    @Override
    public int deleteScoreMallOrderDetailByIds(Long[] ids)
    {
        return scoreMallOrderDetailMapper.deleteScoreMallOrderDetailByIds(ids);
    }

    /**
     * 删除积分商城订单明细表信息
     * 
     * @param id 积分商城订单明细表主键
     * @return 结果
     */
    @Override
    public int deleteScoreMallOrderDetailById(Long id)
    {
        return scoreMallOrderDetailMapper.deleteScoreMallOrderDetailById(id);
    }
}
